package com.wty.dubboconsumer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.wty.dubboserviceapi.DemoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author wangtengyu
 * @Create 2018-07-18-15:30
 */
@RestController
public class DemoController {

    @Reference
//    @Reference(version = "2.0.0")
    private DemoService demoService;

    @RequestMapping("/sayHello")
    public String sayHello(){
        return demoService.sayHello();
    }
}
